home *** CD-ROM | disk | FTP | other *** search
/ InterCD 2000 September / september_2000.iso / intercd / root / ^Linux / Jooky / findplayers.c < prev    next >
Encoding:
C/C++ Source or Header  |  1999-11-01  |  744 b   |  33 lines

  1. #include "includes.h"
  2. #include "defines.h"
  3. #include "funcs.h"
  4.  
  5. char *findplayers()
  6. {
  7.     char *tmpfnd;
  8.     char *tmpdir;
  9.     tmpfnd=calloc(1,256);
  10.     tmpdir=calloc(1,256);
  11.     playerdir=calloc(1,256);
  12.  
  13.     returnstring=NULL;
  14.  
  15.     player=mp3player[playertouse].player;
  16.     for (x=0;strlen(mp3player[playertouse].playerflags[x])!=0;++x)
  17.         playerflags[x]=mp3player[playertouse].playerflags[x];
  18.     playeroutput=mp3player[playertouse].playeroutput;
  19.  
  20.     if ((tmpfnd=pathsrch(player))!=NULL)
  21.     {
  22.         strncat(playerdir,tmpfnd,\
  23.             (int)((char *)rindex(tmpfnd,'/')-(char *)tmpfnd));
  24.         returnstring=calloc(1,256);
  25.         strcpy(returnstring,player);
  26.     } else
  27.     {
  28.         printf ("Can't find %s in path!\n",player);
  29.         returnstring=NULL;
  30.     }
  31.     return (returnstring);
  32. }
  33.